<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: Binary morphology on run-length encoded image</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Binary morphology on run-length encoded image<div class="ingroups"><a class="el" href="../../df/d2d/group__ximgproc.html">Extended Image Processing</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaeb612dd95fb84622846dbb516af7ab88"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#gaeb612dd95fb84622846dbb516af7ab88">cv::ximgproc::rl::createRLEImage</a> (std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#gac4ae8f2fb37ecb4b5d9268f17e46a18e">cv::Point3i</a> &gt; &amp;runs, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> res, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(0, 0))</td></tr>
<tr class="memdesc:gaeb612dd95fb84622846dbb516af7ab88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a run-length encoded image from a vector of runs (column begin, column end, row)  <a href="../../df/def/group__ximgproc__run__length__morphology.html#gaeb612dd95fb84622846dbb516af7ab88">More...</a><br /></td></tr>
<tr class="separator:gaeb612dd95fb84622846dbb516af7ab88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac3de990089892266fa30189edcb6da3c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#gac3de990089892266fa30189edcb6da3c">cv::ximgproc::rl::dilate</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlSrc, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> rlDest, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlKernel, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> anchor=<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>(0, 0))</td></tr>
<tr class="memdesc:gac3de990089892266fa30189edcb6da3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dilates an run-length encoded binary image by using a specific structuring element.  <a href="../../df/def/group__ximgproc__run__length__morphology.html#gac3de990089892266fa30189edcb6da3c">More...</a><br /></td></tr>
<tr class="separator:gac3de990089892266fa30189edcb6da3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1903619622035efbe28ad08151f60ec3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#ga1903619622035efbe28ad08151f60ec3">cv::ximgproc::rl::erode</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlSrc, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> rlDest, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlKernel, bool bBoundaryOn=true, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> anchor=<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>(0, 0))</td></tr>
<tr class="memdesc:ga1903619622035efbe28ad08151f60ec3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erodes an run-length encoded binary image by using a specific structuring element.  <a href="../../df/def/group__ximgproc__run__length__morphology.html#ga1903619622035efbe28ad08151f60ec3">More...</a><br /></td></tr>
<tr class="separator:ga1903619622035efbe28ad08151f60ec3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8a7c10c524fb2572e2eefe0caf0375fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#ga8a7c10c524fb2572e2eefe0caf0375fc">cv::ximgproc::rl::getStructuringElement</a> (int shape, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> ksize)</td></tr>
<tr class="memdesc:ga8a7c10c524fb2572e2eefe0caf0375fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a run length encoded structuring element of the specified size and shape.  <a href="../../df/def/group__ximgproc__run__length__morphology.html#ga8a7c10c524fb2572e2eefe0caf0375fc">More...</a><br /></td></tr>
<tr class="separator:ga8a7c10c524fb2572e2eefe0caf0375fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85ed82296e9e9893dcbaa92b87837019"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#ga85ed82296e9e9893dcbaa92b87837019">cv::ximgproc::rl::isRLMorphologyPossible</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlStructuringElement)</td></tr>
<tr class="memdesc:ga85ed82296e9e9893dcbaa92b87837019"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a custom made structuring element can be used with run length morphological operations. (It must consist of a continuous array of single runs per row)  <a href="../../df/def/group__ximgproc__run__length__morphology.html#ga85ed82296e9e9893dcbaa92b87837019">More...</a><br /></td></tr>
<tr class="separator:ga85ed82296e9e9893dcbaa92b87837019"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga939a4d8afa86b012f6e3d006e6a32180"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#ga939a4d8afa86b012f6e3d006e6a32180">cv::ximgproc::rl::morphologyEx</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlSrc, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> rlDest, int op, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlKernel, bool bBoundaryOnForErosion=true, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> anchor=<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>(0, 0))</td></tr>
<tr class="memdesc:ga939a4d8afa86b012f6e3d006e6a32180"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a morphological operation to a run-length encoded binary image.  <a href="../../df/def/group__ximgproc__run__length__morphology.html#ga939a4d8afa86b012f6e3d006e6a32180">More...</a><br /></td></tr>
<tr class="separator:ga939a4d8afa86b012f6e3d006e6a32180"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7cabc1c2901b8b58082f8febc366638b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#ga7cabc1c2901b8b58082f8febc366638b">cv::ximgproc::rl::paint</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rlSrc, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">cv::Scalar</a> &amp;value)</td></tr>
<tr class="memdesc:ga7cabc1c2901b8b58082f8febc366638b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Paint run length encoded binary image into an image.  <a href="../../df/def/group__ximgproc__run__length__morphology.html#ga7cabc1c2901b8b58082f8febc366638b">More...</a><br /></td></tr>
<tr class="separator:ga7cabc1c2901b8b58082f8febc366638b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6c9167cbfe788a52a07f6dd3ef8ca4d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/def/group__ximgproc__run__length__morphology.html#ga6c9167cbfe788a52a07f6dd3ef8ca4d9">cv::ximgproc::rl::threshold</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> rlDest, double thresh, int type)</td></tr>
<tr class="memdesc:ga6c9167cbfe788a52a07f6dd3ef8ca4d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Applies a fixed-level threshold to each array element.  <a href="../../df/def/group__ximgproc__run__length__morphology.html#ga6c9167cbfe788a52a07f6dd3ef8ca4d9">More...</a><br /></td></tr>
<tr class="separator:ga6c9167cbfe788a52a07f6dd3ef8ca4d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>These functions support morphological operations on binary images. In order to be fast and space efficient binary images are encoded with a run-length representation. This representation groups continuous horizontal sequences of "on" pixels together in a "run". A run is charactarized by the column position of the first pixel in the run, the column position of the last pixel in the run and the row position. This representation is very compact for binary images which contain large continuous areas of "on" and "off" pixels. A checkerboard pattern would be a good example. The representation is not so suitable for binary images created from random noise images or other images where little correlation between neighboring pixels exists.</p>
<p>The morphological operations supported here are very similar to the operations supported in the imgproc module. In general they are fast. However on several occasions they are slower than the functions from imgproc. The structuring elements of <a class="el" href="../../d4/d86/group__imgproc__filter.html#ggac2db39b56866583a95a5680313c314ada260c4cbde19a749726763c01a074c60f" title="a rectangular structuring element:  ">cv::MORPH_RECT</a> and <a class="el" href="../../d4/d86/group__imgproc__filter.html#ggac2db39b56866583a95a5680313c314ada318435753d0b9f7faa241a658ec2e191">cv::MORPH_CROSS</a> have very good support from the imgproc module. Also small structuring elements are very fast in imgproc (presumably due to opencl support). Therefore the functions from this module are recommended for larger structuring elements (<a class="el" href="../../d4/d86/group__imgproc__filter.html#ggac2db39b56866583a95a5680313c314ada33a3c67a61f349d21c507d05c53a755f">cv::MORPH_ELLIPSE</a> or self defined structuring elements). A sample application (run_length_morphology_demo) is supplied which allows to compare the speed of some morphological operations for the functions using run-length encoding and the imgproc functions for a given image.</p>
<p>Run length encoded images are stored in standard opencv images. Images have a single column of <a class="el" href="../../dc/d84/group__core__basic.html#gac4ae8f2fb37ecb4b5d9268f17e46a18e">cv::Point3i</a> elements. The number of rows is the number of run + 1. The first row contains the size of the original (not encoded) image. For the runs the following mapping is used (x: column begin, y: column end (last column), z: row).</p>
<p>The size of the original image is required for compatibility with the imgproc functions when the boundary handling requires that pixel outside the image boundary are "on". </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaeb612dd95fb84622846dbb516af7ab88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeb612dd95fb84622846dbb516af7ab88">&#9670;&nbsp;</a></span>createRLEImage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ximgproc::rl::createRLEImage </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#gac4ae8f2fb37ecb4b5d9268f17e46a18e">cv::Point3i</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>runs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>res</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(0,&#160;0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Creates a run-length encoded image from a vector of runs (column begin, column end, row) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">runs</td><td>vector of runs </td></tr>
    <tr><td class="paramname">res</td><td>result </td></tr>
    <tr><td class="paramname">size</td><td>image size (to be used if an "on" boundary should be used in erosion, using the default means that the size is computed from the extension of the input) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac3de990089892266fa30189edcb6da3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3de990089892266fa30189edcb6da3c">&#9670;&nbsp;</a></span>dilate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ximgproc::rl::dilate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlSrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>rlDest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlKernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>&#160;</td>
          <td class="paramname"><em>anchor</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>(0,&#160;0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Dilates an run-length encoded binary image by using a specific structuring element. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rlSrc</td><td>input image </td></tr>
    <tr><td class="paramname">rlDest</td><td>result </td></tr>
    <tr><td class="paramname">rlKernel</td><td>kernel </td></tr>
    <tr><td class="paramname">anchor</td><td>position of the anchor within the element; default value (0, 0) is usually the element center. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1903619622035efbe28ad08151f60ec3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1903619622035efbe28ad08151f60ec3">&#9670;&nbsp;</a></span>erode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ximgproc::rl::erode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlSrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>rlDest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlKernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bBoundaryOn</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>&#160;</td>
          <td class="paramname"><em>anchor</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>(0,&#160;0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Erodes an run-length encoded binary image by using a specific structuring element. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rlSrc</td><td>input image </td></tr>
    <tr><td class="paramname">rlDest</td><td>result </td></tr>
    <tr><td class="paramname">rlKernel</td><td>kernel </td></tr>
    <tr><td class="paramname">bBoundaryOn</td><td>indicates whether pixel outside the image boundary are assumed to be on (True: works in the same way as the default of <a class="el" href="../../d4/d86/group__imgproc__filter.html#gaeb1e0c1033e3f6b891a25d0511362aeb" title="Erodes an image by using a specific structuring element. ">cv::erode</a>, False: is a little faster) </td></tr>
    <tr><td class="paramname">anchor</td><td>position of the anchor within the element; default value (0, 0) is usually the element center. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8a7c10c524fb2572e2eefe0caf0375fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8a7c10c524fb2572e2eefe0caf0375fc">&#9670;&nbsp;</a></span>getStructuringElement()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> cv::ximgproc::rl::getStructuringElement </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>shape</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>ksize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Returns a run length encoded structuring element of the specified size and shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">shape</td><td>Element shape that can be one of <a class="el" href="../../d4/d86/group__imgproc__filter.html#gac2db39b56866583a95a5680313c314ad" title="shape of the structuring element ">cv::MorphShapes</a> </td></tr>
    <tr><td class="paramname">ksize</td><td>Size of the structuring element. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga85ed82296e9e9893dcbaa92b87837019"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga85ed82296e9e9893dcbaa92b87837019">&#9670;&nbsp;</a></span>isRLMorphologyPossible()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::ximgproc::rl::isRLMorphologyPossible </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlStructuringElement</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Check whether a custom made structuring element can be used with run length morphological operations. (It must consist of a continuous array of single runs per row) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rlStructuringElement</td><td>mask to be tested </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga939a4d8afa86b012f6e3d006e6a32180"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga939a4d8afa86b012f6e3d006e6a32180">&#9670;&nbsp;</a></span>morphologyEx()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ximgproc::rl::morphologyEx </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlSrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>rlDest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlKernel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>bBoundaryOnForErosion</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>&#160;</td>
          <td class="paramname"><em>anchor</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>(0,&#160;0)</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Applies a morphological operation to a run-length encoded binary image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rlSrc</td><td>input image </td></tr>
    <tr><td class="paramname">rlDest</td><td>result </td></tr>
    <tr><td class="paramname">op</td><td>all operations supported by <a class="el" href="../../d4/d86/group__imgproc__filter.html#ga67493776e3ad1a3df63883829375201f" title="Performs advanced morphological transformations. ">cv::morphologyEx</a> (except <a class="el" href="../../d4/d86/group__imgproc__filter.html#gga7be549266bad7b2e6a04db49827f9f32acf55ff766595ec0174ba42852f0ac264">cv::MORPH_HITMISS</a>) </td></tr>
    <tr><td class="paramname">rlKernel</td><td>kernel </td></tr>
    <tr><td class="paramname">bBoundaryOnForErosion</td><td>indicates whether pixel outside the image boundary are assumed to be on for erosion operations (True: works in the same way as the default of <a class="el" href="../../d4/d86/group__imgproc__filter.html#gaeb1e0c1033e3f6b891a25d0511362aeb" title="Erodes an image by using a specific structuring element. ">cv::erode</a>, False: is a little faster) </td></tr>
    <tr><td class="paramname">anchor</td><td>position of the anchor within the element; default value (0, 0) is usually the element center. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga7cabc1c2901b8b58082f8febc366638b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7cabc1c2901b8b58082f8febc366638b">&#9670;&nbsp;</a></span>paint()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ximgproc::rl::paint </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a>&#160;</td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>rlSrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">cv::Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Paint run length encoded binary image into an image. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>image to paint into (currently only single channel images). </td></tr>
    <tr><td class="paramname">rlSrc</td><td>run length encoded image </td></tr>
    <tr><td class="paramname">value</td><td>all foreground pixel of the binary image are set to this value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga6c9167cbfe788a52a07f6dd3ef8ca4d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6c9167cbfe788a52a07f6dd3ef8ca4d9">&#9670;&nbsp;</a></span>threshold()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::ximgproc::rl::threshold </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>rlDest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>thresh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><code>#include &lt;<a class="el" href="../../d2/d17/run__length__morphology_8hpp.html">opencv2/ximgproc/run_length_morphology.hpp</a>&gt;</code></p>

<p>Applies a fixed-level threshold to each array element. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input array (single-channel). </td></tr>
    <tr><td class="paramname">rlDest</td><td>resulting run length encoded image. </td></tr>
    <tr><td class="paramname">thresh</td><td>threshold value. </td></tr>
    <tr><td class="paramname">type</td><td>thresholding type (only <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a147222a96556ebc1d948b372bcd7ac59" title=" ">cv::THRESH_BINARY</a> and <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a19120b1a11d8067576cc24f4d2f03754" title=" ">cv::THRESH_BINARY_INV</a> are supported) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:42 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
